#ifndef CARDSET_H
#define CARDSET_H

#include "card.h"
#include <QVector>
#include <algorithm>

struct CardSet {
    QVector<Card> cards;

    CardSet(const QString& str)
    {
        for (int i = 0; i < str.size(); ++i)
            cards.push_back(Card::fromChar(str[i].unicode()));
        std::sort(cards.begin(), cards.end(), std::greater<Card>());
    }

    template <typename Container>
    CardSet(const Container& cont)
    {
        for (Card card : cont)
            cards.push_back(card);
        std::sort(cards.begin(), cards.end(), std::greater<Card>());
    }

    QString getType() const;
    bool isComparable(const CardSet&) const;
    bool operator > (const CardSet&) const;
};


#endif // CARDSET_H
